home *** CD-ROM | disk | FTP | other *** search
/ Web Star/List Star - Eve…he Ultimate Internet Site / StarNine Internet Pubisher (Web Star and List Star)(StarNine)(1995).iso / ListSTAR™ / Tools and Enhancments / Debugging Scripts / Return Parameters < prev   
Encoding:
Text File  |  1995-07-25  |  2.7 KB  |  74 lines  |  [TEXT/ToyS]

  1. -----------------------------------------------------------------------
  2. -- StarNine Technologies, Inc., hereby disclaims all copyright interest
  3. -- in the following source code.
  4. -- 
  5. -- This source code is free and has been placed into the public domain.
  6. -- You can redistribute it, modify it (including these comments) and/or
  7. -- create derivative works from it as you see fit.
  8. --
  9. -- This source code is made available in the hope that it will be useful,
  10. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. -----------------------------------------------------------------------
  13.  
  14. (*
  15. ** Uncomment the below settings when testing outside of ListSTAR Server
  16. ** ListSTAR Server will automatically prepend these settings to your TEXT script
  17. ** before compiling and executing it.
  18. *)
  19. (************************
  20. --set s9MailService to "Test Service"
  21. --set s9SenderName to "Test Name"
  22. --set s9SenderEmailAddress to "Test Address"
  23. --set s9SenderMC to ""
  24. --set s9SenderMCZone to ""
  25. --set s9SenderMCEmailAddress to ""
  26. --set s9MailSubject to "Test Subject"
  27. --set s9MailFileName to "Test Filename"
  28. --set s9RegularExpression to {{"Test Data"}, {"test data 2", "test data 3"}}
  29. *)
  30. (************************* end of test settings *************************)
  31.  
  32. --
  33. -- Try to automatically find our AppleScript library. It should be in
  34. -- ListSTAR's "ADMIN" folder.
  35. --
  36. set bootDisk to (path to startup disk as string)
  37. set appleScriptLibrary to ""
  38.  
  39. tell application "Finder"
  40.     if exists of item (bootDisk & "ListSTAR/SMTP:ListSTAR Server") then
  41.         set appleScriptLibrary to bootDisk & "ListSTAR/SMTP:ADMIN:AppleScript.library"
  42.     else if exists of item (bootDisk & "ListSTAR/MS:ListSTAR Server") then
  43.         set appleScriptLibrary to bootDisk & "ListSTAR/MS:ADMIN:AppleScript.library"
  44.     else if exists of item (bootDisk & "ListSTAR/POP:ListSTAR Server") then
  45.         set appleScriptLibrary to bootDisk & "ListSTAR/POP:ADMIN:AppleScript.library"
  46.     else if exists of item (bootDisk & "ListSTAR/QM:ListSTAR Server") then
  47.         set appleScriptLibrary to bootDisk & "ListSTAR/QM:ADMIN:AppleScript.library"
  48.     end if
  49.     --
  50.     -- If we can't find it, ask the user where it is.
  51.     --
  52.     if (exists of item appleScriptLibrary) is false then
  53.         choose file with prompt "Locate ListSTAR's “AppleScript.library”" of type {"osas"}
  54.         set appleScriptLibrary to (result as string)
  55.     end if
  56. end tell
  57.  
  58. set ListSTARLib to (load script file appleScriptLibrary)
  59.  
  60. tell ListSTARLib
  61.     try
  62.         (*
  63.                 ** Invoke the appleScriptLibrary routine that will actually
  64.                 ** return a message to the sender with the paramters and their
  65.                 ** values shown.
  66.                 *)
  67.         returnParameterMessage()
  68.         return 0
  69.     on error errString number errNum
  70.         return errNum
  71.     end try
  72. end tell
  73.  
  74. return 0